package com.example.teamtribe.json;

import com.example.teamtribe.database.User;

public class JsonUser {

    private int code;
    private mUser user;

    public int getCode() {
        return code;
    }

    public User getUser() {
        User newUser = new User();
        newUser.setRealId(user.id);
        newUser.setNickname(user.nickname);
        newUser.setPortrait(user.portrait);
        newUser.setIsPublic(user.isPublic);
        newUser.setSchoolId(user.student.schoolId);
        newUser.setNo(user.student.no);
        newUser.setName(user.student.name);
        newUser.setGender(user.student.gender);
        newUser.setBirthday(user.student.birthday);
        newUser.setAcademy(user.student.academy);
        newUser.setMajor(user.student.major);
        newUser.setGrade(user.student.grade);
        newUser.setCla(user.student.cla);
        return newUser;
    }

    public class mUser {
        private int id;
        private String nickname;
        private String portrait;
        private int isPublic;
        private mStudent student;
    }

    public class mStudent {
        private int schoolId;
        private String no;
        private String name;
        private int gender;
        private String birthday;
        private String academy;
        private String major;
        private int grade;
        private int cla;
    }

}
